-- GENERATED SPELL FOR [Cabal Deathsworn] --


function spell0_18635(pUnit, Event) --@Black Cleave,n/a--
pUnit:FullCastSpellOnTarget(33480,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18635', 12000, 1)
end

function spell1_18635(pUnit, Event) --@Black Cleave,n/a--
pUnit:FullCastSpellOnTarget(38226,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18635', 12000, 1)
end

function spell2_18635(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_18635', 578, 1)
end

function spell3_18635(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18635', 2303, 1)
end

function Sorts_18635(pUnit, Event)
local choix_sorts_18635 = math.random(0, 3)
if choix_sorts_18635 == 0 then
pUnit:RegisterEvent('spell0_18635', 1, 1)
end
if choix_sorts_18635 == 1 then
pUnit:RegisterEvent('spell1_18635', 1, 1)
end
if choix_sorts_18635 == 2 then
pUnit:RegisterEvent('spell2_18635', 1, 1)
end
if choix_sorts_18635 == 3 then
pUnit:RegisterEvent('spell3_18635', 1, 1)
end
end

function mob18635_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18635', math.random(1500, 3000), 1)
end

function mob18635_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18635_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18635_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18635, 1, 'mob18635_Action')
RegisterUnitEvent(18635, 2, 'mob18635_Leave')
RegisterUnitEvent(18635, 3, 'mob18635_Kill')
RegisterUnitEvent(18635, 4, 'mob18635_Die')
